package org.bbx.autoops.utils;


import lombok.extern.slf4j.Slf4j;

import java.io.FileWriter;
import java.io.IOException;

@Slf4j
public class MdFileUtil {


    /**
     * 输出内容到 目标文件
     *
     * @param res            输出内容
     * @param outPutFileName 输出文件（需要包含路径）
     */
    public static void wiriteMDFile(String res, String outPutFileName) throws IOException {

        FileWriter fileWriter = null;
        try {
            fileWriter = new FileWriter(outPutFileName);
            fileWriter.write(res);
            fileWriter.flush();
        }  finally {
            if (fileWriter != null) {
                try {
                    fileWriter.close();
                } catch (IOException e) {
                    log.error(e.getMessage());

                }
            }


        }


    }
}
